/*
 * @(#)OgnlCallParametersPropertyAccessor.java $version 2010. 8. 11
 *
 * Copyright 2007-2010 NHN Corp. All rights Reserved. 
 * NHN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.nhncorp.usf.core.ognl;

import java.util.Map;

import ognl.OgnlContext;
import ognl.OgnlException;
import ognl.PropertyAccessor;

/**
 * The Class OgnlCallParametersPropertyAccessor.
 *
 * @author MiddleWare Platform Development Team
 */
class OgnlCallParametersPropertyAccessor implements PropertyAccessor {

    /**
     * Instantiates a new ognl call parameters property accessor.
     */
    OgnlCallParametersPropertyAccessor() {
        super();
    }

    /**
     * {@inheritDoc}
     */
    @SuppressWarnings("unchecked")
    public Object getProperty(Map context, Object target, Object name) throws OgnlException {
        OgnlCallParameters params = (OgnlCallParameters) target;
        return params.getParameterValue(String.valueOf(name));
    }

    /**
     * {@inheritDoc}
     */
    @SuppressWarnings("unchecked")
    public void setProperty(Map context, Object target, Object name, Object value) throws OgnlException {
        OgnlCallParameters params = (OgnlCallParameters) target;
        params.setParameterValue(context, String.valueOf(name), value);
    }

    /**
     * {@inheritDoc}
     */
    public String getSourceAccessor(OgnlContext ognlContext, Object obj, Object obj1) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    /**
     * {@inheritDoc}
     */
    public String getSourceSetter(OgnlContext ognlContext, Object obj, Object obj1) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }
}
